import 'dart:ui';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/painting.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        useMaterial3: false,
        primarySwatch: Colors.yellow,
      ),
      home: Scaffold(
        appBar: AppBar(title: const Text("Flutter App")),
        body: const MyHomePage(),
      ),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) {
    //设置宽高比
    return ListView(
      children: [
        Card(
          margin: EdgeInsets.all(10), //调整间距
          elevation: 10, //设置卡片阴影
          shape: RoundedRectangleBorder(
            borderRadius: BorderRadius.circular(10), //配置圆角
          ),
          child: const Column(
            children: [
              ListTile(
                title: Text("张三",style: TextStyle(fontSize: 22),),
                subtitle: Text("高级工程师"),
              ),
              Divider(),
              ListTile(
                title: Text("电话:1522222222"),
              ),
              ListTile(
                title: Text("地址:北京市海淀区XXX"),
              )
            ],
          ),
        ),
        const Card(
          elevation: 10, //设置卡片阴影
          child: Column(
            children: [
              ListTile(
                title: Text("李四",style: TextStyle(fontSize: 22),),
                subtitle: Text("Flutter高级工程师"),
              ),
              Divider(),
              ListTile(
                title: Text("电话:1522222222"),
              ),
              ListTile(
                title: Text("地址:北京市海淀区XXX"),
              )
            ],
          ),
        )
      ],
    );
  }
}
